/************
Ten tac gia : Ly Thien kim
Ngay tao : 8/16/2011
Noi dung : Delete 1 Crame
************/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE NAME = 'sp_DeleteCrame')
BEGIN
	DROP PROC sp_DeleteCrame
END
GO
CREATE PROC sp_DeleteCrame
	@CRIMEID				int,
	@LISTCRIMEID			int,
	@Result					int out
	AS
	BEGIN
		IF EXISTS (SELECT * FROM CRAME WHERE  @CRIMEID = CRIMEID and @LISTCRIMEID = LISTCRIMEID)
		BEGIN
			DELETE FROM CRAME
			WHERE @CRIMEID = CRIMEID and @LISTCRIMEID = LISTCRIMEID
			SET @RESULT = 1
		END
		ELSE 
		BEGIN
			SET @RESULT = 0
		END
	END
